Skip to content

Career: a position that begins on a given day turns into the one in progress by itself - #765

Merged
BSoDium merged 1 commit into
mainfrom
ccr-0e5d32bf-nuba36
Nov 26, 2026
Merged

BSoDium merged 1 commit into
mainfrom
ccr-0e5d32bf-nuba36

Conversation

@BSoDium

@BSoDium BSoDium commented Nov 26, 2026

Copy link
Copy Markdown
Owner

What

Follow-up to #763 ("Joining"). That flag had to be removed by hand once the owner had joined. The owner asked for the page to turn by itself ("this shouldn't require a data change, it's just a UI change depending on the current date").

  • Contract (additive): role.upcoming is now true (as before: until removed) or a day YYYY-MM-DD that falls in start (a real calendar day; leap days handled). Refused with end: present. true stays valid, so the published projection needs no change to keep working.
  • Behaviour: from that day the role is the position in progress: marker, Nov 2026 – Present, stay counted; an absent end means present, a dated end is kept.
  • The clock, as a bounded exception: /career and /career.md are prerendered static files, so a build-time date would freeze. The day is read in the browser only, after hydration (useHydrated()): the prerendered HTML and the first client render are the document as authored (Joining), so there is no hydration mismatch. Only roleState(role, today) (pure, the day is an argument) and localDay() (its only source) touch it; a test fails if the page, the head tags or the Markdown twin read a clock anywhere else. The Markdown twin says Starts 2026-11-30 (true on any day).
  • Docs: docs/career-page.md gets a section "The one use of the clock" (where, what it moves, which day, the known cost, and how to do the same for another time-relative fact); docs/api-contract.md.

Known cost

For a visitor after the day, the first paint is the static Joining and it turns when the script hydrates (a stay length appears, so a line of the head moves). Before the day, or for upcoming: true, nothing moves. Not measured on a slow phone.

Order

Merge this first (the web app's schema is strict), then the content PR in BSoDium/Catalyst-content (sets upcoming: 2026-11-30 on the NordVPN role), then the content/publish PR. Until then the published upcoming: true keeps working.

Checked

pnpm -r test passes (schemas 135, web 2676, api 51, published 32, geodata 105), typecheck clean. In Chromium with demo content (a role begun in the past, one in 2099): without JavaScript both say Joining; with it the first turns into the role in progress, the second stays, no hydration warning. Not verified: Safari and iOS, print and forced colours, a slow connection.

Tracking

No issue; not linked to one. I could not reach the "Open-source development" board from this session (GraphQL is blocked), so it still has to be added there with every property filled in.


Generated by Claude Code

…rogress by itself

`upcoming` is now `true` or a day (YYYY-MM-DD, in the month of `start`). From
that day the role is the position in progress (an absent end meaning present).
The pages are static files, so the day is read in the browser only, after
hydration: the prerendered HTML and the first client render are the document as
authored, and a test pins that nothing else on the page reads a clock.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ub8ohSguH8W9X1pXh6EF3b
@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
catalyst-v2 Ready Ready Preview Nov 26, 2026 4:03pm UTC
catalyst-v2-api Ready Ready Preview Nov 26, 2026 4:03pm UTC

@BSoDium
BSoDium marked this pull request as ready for review November 26, 2026 17:26
@BSoDium
BSoDium merged commit 38cb548 into main Nov 26, 2026
5 checks passed
@BSoDium
BSoDium deleted the ccr-0e5d32bf-nuba36 branch November 26, 2026 17:27
@BSoDium BSoDium self-assigned this Nov 26, 2026

This branch was successfully deployed

2 active deployments
Preview – catalyst-v2-api — cca1700e Deployed Nov 26, 2026 by vercel[bot]
Preview – catalyst-v2 — cca1700e Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants